var API = {
    callInterface: function (url, data, async, callback, errorcallback) {

        var timestamp = (new Date()).getTime();
        var aparam = signparam(data, timestamp, '');
        var temp = timestamp;
        data.timestamp = timestamp;
        data.sb = aparam;
        var settings = {
            type: 'POST',
            url: url,
            data: data,
            async: async,
            cache: false,
            dataType: 'json',
            beforeSend: function () {
                return true;
            },
            success: function (res) {
                callback(res);
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                if ($("#errorRequestStatus")) {
                    $("#errorRequestStatus").val(XMLHttpRequest.status);
                }
                if ($("#errorRequestReadyState")) {
                    $("#errorRequestReadyState").val(XMLHttpRequest.readyState);
                }
                if ($("#errorTextStatus")) {
                    $("#errorTextStatus").val(textStatus);
                }
                // 如果在一个方法调用未结束直接切换页面会包状态为0的错误，屏蔽掉
                if (XMLHttpRequest.status != 0) {
                    alert('系统异常，请与管理员联系');
                }
            },
            complete: function () {
            }
        };
        dw.ajax(settings);
    },

    slangSentenceEdit: function (param, callback) {
        API.callInterface("/slang/sentence_edit.do", param, true, callback);
    },

    slangSentencePreview: function (param, callback) {
        API.callInterface("/slang/sentence_preview.do", param, true, callback);
    },

    slangSubmitPackage: function (callback) {
        API.callInterface("/slang/sentence_submit_package.do", {}, true, callback);
    },

    slangRuleEdit: function (param, callback) {
        API.callInterface("/slang_rule_edit.do", param, true, callback);
    },

    slangSentenceDelete: function (param, callback) {
        API.callInterface("/slang/sentence_delete.do", param, true, callback);
    },

    slangSentenceRestore: function (param, callback) {
        API.callInterface("/slang/sentence_restore.do", param, true, callback);
    },

    bankEdit: function (param, callback) {
        API.callInterface("/xbs/bank_eidt.do", param, true, callback);
    },

    bankDelete: function (param, callback) {
        API.callInterface("/xbs/bank_delete.do", param, true, callback);
    },

    xbsSentenceEdit: function (param, callback) {
        API.callInterface("/xbs/sentence_edit.do", param, true, callback);
    },

    xbsSentencePreview: function (param, callback) {
        API.callInterface("/xbs/sentence_preview.do", param, true, callback);
    },

    xbsSubmitPackage: function (param, callback) {
        API.callInterface("/xbs/sentence_submit_package.do", param, true, callback);
    },

    xbsRuleEdit: function (param, callback) {
        API.callInterface("/xbs/rule_edit.do", param, true, callback);
    },

    xbsSubmitServer: function (param, callback) {
        API.callInterface("/xbs/submit_server.do", param, true, callback);
    },

    indexEdit: function (param, callback) {
        API.callInterface("/inspection/insert_or_update.do", param, true, callback);
    },

    inspectionInsertTestingClass: function (param, callback) {
        API.callInterface("/inspection/insert_testing_class.do", param, true, callback);
    },

    inspectionUpdateTestingClass: function (param, callback) {
        API.callInterface("/inspection/update_testing_class.do", param, true, callback);
    },

    indexesSubmitServer: function (callback) {
        API.callInterface("/inspection/submit_server.do", {}, true, callback);
    },

    getEncyclopediaByIndex: function (param, callback) {
        API.callInterface("/inspection/get_encyclopedia_by_index.do", param, true, callback);
    },

    initSynonymy: function (callback) {
        API.callInterface("/inspection/init_synonymy.do", {}, true, callback);
    },
    // 主诉相关-begin
    zsSentencePreview: function (param, callback) {
        API.callInterface("/zs/sentence_preview.do", param, true, callback);
    },

    ruleDelete: function (param, callback) {
        API.callInterface("/zs/rule_del.do", param, true, callback);
    },

    ruleChangeCheckFlag: function (param, callback) {
        API.callInterface("/analysis/change_check_flag.do", param, true, callback);
    },
    // 主诉相关-end

    // 疾病-begin
    icdCodeEdit: function (param, callback) {
        API.callInterface("/icd/code_edit.do", param, true, callback);
    },

    icdDiseaseGetCategoryByName: function (param, callback) {
        API.callInterface("/icd/disease_get_category_by_name.do", param, true, callback);
    },

    icdDiseaseCheckFormerName: function (param, callback) {
        API.callInterface("/icd/disease_check_former_name.do", param, true, callback);
    },

    icdCodeGetPnameByCode: function (param, callback) {
        API.callInterface("/icd/code_get_pname_by_code.do", param, true, callback);
    },

    icdCodeSubmitServer: function (callback) {
        API.callInterface("/icd/code_submit_server.do", {}, true, callback);
    },

    icdDiseaseSymptomSubmitPage: function (param, callback) {
        API.callInterface("/icd/disease_symptom_submit_page.do", param, true, callback);
    },

    diseaseSetSex: function (param, callback) {
        API.callInterface("/icd/disease_set_sex.do", param, false, callback);
    },

    diseaseSetAge: function (param, callback) {
        API.callInterface("/icd/disease_set_age.do", param, false, callback);
    },

    diseaseSubmitSexAge: function (param, callback) {
        API.callInterface("/icd/disease_submit_sex_age.do", param, true, callback);
    },

    diseaseSetUrgentFlag: function (param, callback) {
        API.callInterface("/icd/disease_set_urgent_flag.do", param, true, callback);
    },

    diseaseIndexCheckFlag: function (param, callback) {
        API.callInterface("/icd/disease_index_check_flag.do", param, true, callback);
    },

    diseaseIndexSearchList: function (param, callback) {
        API.callInterface("/icd/disease_index_search_list.do", param, true, callback);
    },

    diseaseSetCheckCategory: function (param, callback) {
        API.callInterface("/icd/disease_set_check_category.do", param, true, callback);
    },

    diseaseInspectionSubmitServer: function (callback) {
        API.callInterface("/icd/disease_inspection_submit_server.do", {}, true, callback);
    },
    diseaseImageUpdate: function (param, callback) {
        API.callInterface("/icd/update_disease_image_name.do", param, true, callback);
    },
    diseaseHospitalChangeDiseaseName: function (param, callback) {
        API.callInterface("/icd/disease_hospital_change_name.do", param, true, callback);
    },
    changeNationalStdDisable: function (param, callback) {
        API.callInterface("/icd/disease_national_std_change_disable.do", param, true, callback);
    },
    icdDiseaseNationalStdSumitEdit: function (param, callback) {
        API.callInterface("/icd/disease_national_std_submit_edit.do", param, true, callback);
    },
    // 疾病-end

    // 症状-begin
    symptomEdit: function (param, callback) {
        API.callInterface("/symptom/symptom_edit.do", param, true, callback);
    },
    // 症状-end

    // 症状校验-begin
    elementCheckPage: function (param, callback) {
        API.callInterface("/vocab/element_check_page.do", param, true, callback);
    },

    elementMappingSlang: function (param, callback) {
        API.callInterface("/vocab/element_mapping_slang.do", param, true, callback);
    },

    elementSetSex: function (param, callback) {
        API.callInterface("/vocab/element_set_sex.do", param, true, callback);
    },

    elementSetAge: function (param, callback) {
        API.callInterface("/vocab/element_set_age.do", param, true, callback);
    },

    elementSubmitSexAge: function (param, callback) {
        API.callInterface("/vocab/element_submit_sex_age.do", param, true, callback);
    },

    atomSymptomCheckPage: function (param, callback) {
        API.callInterface("/vocab/atom_symptom_check_page.do", param, true, callback);
    },

    atomSymptomCheckPageByChecked: function (param, callback) {
        API.callInterface("/vocab/atom_symptom_check_page_by_checked.do", param, true, callback);
    },

    atomSymptomSetType: function (param, callback) {
        API.callInterface("/vocab/atom_symptom_set_type.do", param, true, callback);
    },

    elementAddCategory: function (param, callback) {
        API.callInterface("/vocab/element_add_category.do", param, true, callback);
    },

    elementDeleteCategory: function (param, callback) {
        API.callInterface("/vocab/element_delete_category.do", param, true, callback);
    },

    elementRAddSynonymy: function (param, callback) {
        API.callInterface("/vocab/element_r_add_synonymy.do", param, true, callback);
    },

    elementChangeCategory: function (param, callback) {
        API.callInterface("/vocab/element_change_category.do", param, true, callback);
    },

    elementChangeParent: function (param, callback) {
        API.callInterface("/vocab/element_change_parent.do", param, true, callback);
    },

    elementClassifySubmitPage: function (param, callback) {
        API.callInterface("/vocab/element_classify_submit_page.do", param, true, callback);
    },

    wildcardGetList: function (callback) {
        API.callInterface("/vocab/wildcard_get_list.do", {}, true, callback);
    },
    elementClassifyConflict: function (callback) {
        API.callInterface("/vocab/element_classify_init.do", {}, true, callback);
    },
    elementDeleteClassify: function (param, callback) {
        API.callInterface("/vocab/element_classify_delete.do", param, true, callback);
    },
    wildcardAdd: function (param, callback) {
        API.callInterface("/vocab/wildcard_add.do", param, true, callback);
    },

    wildcardDelete: function (param, callback) {
        API.callInterface("/vocab/wildcard_delete.do", param, true, callback);
    },

    wildcardCheckPage: function (param, callback) {
        API.callInterface("/vocab/element_wildcard_check_page.do", param, true, callback);
    },

    elementAddLabel: function (param, callback) {
        API.callInterface("/vocab/element_add_label.do", param, true, callback);
    },

    elementLabelChangeIsDecorateO: function (param, callback) {
        API.callInterface("/vocab/element_label_change_isdecorateO.do", param, true, callback);
    },

    elementDeleteLabel: function (param, callback) {
        API.callInterface("/vocab/element_delete_label.do", param, true, callback);
    },

    elementChangeLabel: function (param, callback) {
        API.callInterface("/vocab/element_change_label.do", param, true, callback);
    },

    elementChangeQuantization: function (param, callback) {
        API.callInterface("/vocab/element_change_quantization.do", param, true, callback);
    },

    elementDesignateOrgan: function (param, callback) {
        API.callInterface("/vocab/element_designate_organ.do", param, true, callback);
    },

    elementDesignateOrganSubmitPage: function (param, callback) {
        API.callInterface("/vocab/element_designate_organ_submit_page.do", param, true, callback);
    },

    elementChangeTimeQuantization: function (param, callback) {
        API.callInterface("/vocab/element_change_time_quantization.do", param, true, callback);
    },

    elementChangeRestrictSource: function (param, callback) {
        API.callInterface("/vocab/element_change_restrict_source.do", param, true, callback);
    },

    elementReasonClassRefresh: function (callback) {
        API.callInterface("/vocab/element_refresh_reason_class.do", {}, true, callback);
    },

    elementSourceSubmitPage: function (param, callback) {
        API.callInterface("/vocab/element_source_submit_page.do", param, true, callback);
    },

    elementSourceRefresh: function (callback) {
        API.callInterface("/vocab/element_source_init.do", {}, true, callback);
    },

    elementAnalysisFlagCheck: function (param, callback) {
        API.callInterface("/vocab/element_r_check_analysis.do", param, true, callback);
    },

    dyadRemoveAdd: function (param, callback) {
        API.callInterface("/vocab/dyad_remove_add.do", param, true, callback);
    },

    dyadRemoveCheckPage: function (param, callback) {
        API.callInterface("/vocab/dyad_remove_check_page.do", param, true, callback);
    },

    dyadStdCheckPage: function (param, callback) {
        API.callInterface("/vocab/dyad_std_check_page.do", param, true, callback);
    },

    dyadStdCheckPageTest: function (param, callback) {
        API.callInterface("/vocab/dyad_std_check_page_test.do", param, true, callback);
    },

    dyadChangeStd: function (param, callback) {
        API.callInterface("/vocab/dyad_change_std.do", param, true, callback);
    },

    dyadDeleteSynonym: function (param, callback) {
        API.callInterface("/vocab/dyad_delete_synonym.do", param, true, callback);
    },

    dyadStdMerge: function (param, callback) {
        API.callInterface("/vocab/dyad_std_merge.do", param, true, callback);
    },

    dyadStdAddRemove: function (param, callback) {
        API.callInterface("/vocab/dyad_std_add_remove.do", param, true, callback);
    },

    dyadStdPreCheck: function (param, callback) {
        API.callInterface("/vocab/dyad_std_pre_flag.do", param, true, callback);
    },

    dyadStdSubmitBase: function (callback) {
        API.callInterface("/vocab/dyad_std_submit_base.do", {}, true, callback);
    },

    dyadStdLabelCheck: function (param, callback) {
        API.callInterface("/vocab/dyad_std_label_flag.do", param, true, callback);
    },

    dyadStdMergeElement: function (param, callback) {
        API.callInterface("/vocab/dyad_std_merge_flag.do", param, true, callback);
    },

    dyadStdDisplayCheck: function (param, callback) {
        API.callInterface("/vocab/dyad_std_display_flag.do", param, true, callback);
    },

    dyadStdReplaceCheck: function (param, callback) {
        API.callInterface("/vocab/dyad_std_replace_flag.do", param, true, callback);
    },

    dyadChangeSynonym: function (param, callback) {
        API.callInterface("/vocab/dyad_change_synonym.do", param, true, callback);
    },

    dyadStdUpdateCombineS: function (param, callback) {
        API.callInterface("/vocab/dyad_std_update_combine_s.do", param, true, callback);
    },

    dyadStdUpdateSentenceOrder: function (param, callback) {
        API.callInterface("/vocab/dyad_std_update_sentence_order.do", param, true, callback);
    },

    dyadOCheckPChangeElementSynonym: function (param, callback) {
        API.callInterface("/vocab/dyad_o_check_p_change_element_synonym.do", param, true, callback);
    },
    dyadOCheckPDelStd: function (param, callback) {
        API.callInterface("/vocab/dyad_o_check_p_del_std.do", param, true, callback);
    },
    dyadOCheckPChangeLevel: function (param, callback) {
        API.callInterface("/vocab/dyad_o_check_p_change_level.do", param, true, callback);
    },

    dyadOCheckPSubmitDyad: function (param, callback) {
        API.callInterface("/vocab/dyad_o_check_p_submit_dyad.do", param, true, callback);
    },

    dyadOCheckPSubmitPage: function (param, callback) {
        API.callInterface("/vocab/dyad_o_check_p_submit_page.do", param, true, callback);
    },

    dyadOCheckPRefresh: function (callback) {
        API.callInterface("/vocab/dyad_o_check_p_init.do", {}, true, callback);
    },

    dyadStdUpdateODeFlag: function (param, callback) {
        API.callInterface("/vocab/dyad_o_de_update_flag.do", param, true, callback);
    },
    mergeTrueDyadByElementStd: function (callback) {
        API.callInterface("/vocab/merge_true_dyad_by_element_std.do", {}, true, callback);
    },

    elementReasonClassSetSex: function (param, callback) {
        API.callInterface("/vocab/element_reason_class_set_sex.do", param, true, callback);
    },

    elementReasonClassSetAge: function (param, callback) {
        API.callInterface("/vocab/element_reason_class_set_age.do", param, true, callback);
    },

    elementReasonClassSubmitSexAge: function (param, callback) {
        API.callInterface("/vocab/element_reason_class_submit_sex_age.do", param, true, callback);
    },

    elementOOaEqualsInit: function (callback) {
        API.callInterface("/vocab/element_o_oa_equals_init.do", {}, true, callback);
    },

    elementOOaEqualsCheckPage: function (param, callback) {
        API.callInterface("/vocab/element_o_oa_equals_check_page.do", param, true, callback);
    },

    elementInitSynSexAge: function (callback) {
        API.callInterface("/vocab/element_init_syn_sex_age.do", {}, true, callback);
    },

    // 症状校验-end

    // 近义词-begin
    homoionymSearchTermsEdit: function (param, callback) {
        API.callInterface("/homoionym/search_terms_edit.do", param, true, callback);
    },
    // 近义词-end

    // 管理-begin
    managementAddUser: function (param, callback) {
        API.callInterface("/management/add_user.do", param, true, callback);
    },

    managementSetRole: function (param, callback) {
        API.callInterface("/management/set_role.do", param, true, callback);
    },

    managementSetPage: function (param, callback) {
        API.callInterface("/management/set_page.do", param, true, callback);
    },

    managementHideUser: function (param, callback) {
        API.callInterface("/management/hide_user.do", param, true, callback);
    },

    managementDisplayUser: function (param, callback) {
        API.callInterface("/management/display_user.do", param, true, callback);
    },

    managementMigrateUpdate: function (param, callback) {
        API.callInterface("/management/migrate_update.do", param, true, callback);
    },

    managementMigrateExcute: function (param, callback) {
        API.callInterface("/management/migrate_excute.do", param, true, callback);
    },

    managementUpdateGradeParam: function (param, callback) {
        API.callInterface("/management/grade_udpate_param.do", param, true, callback);
    },
    // 管理-end

    // 标注-begin
    analysisSentenceEdit: function (param, callback) {
        API.callInterface("/analysis/sentence_edit.do", param, true, callback);
    },

    checkSentenceEdit: function (param, callback) {
        API.callInterface("/check_sentence/sentence_edit.do", param, true, callback);
    },

    analysisRuleEdit: function (param, callback) {
        API.callInterface("/analysis/rule_edit.do", param, true, callback);
    },

    analysisSentencePreview: function (param, callback) {
        API.callInterface("/analysis/preview.do", param, true, callback);
    },
    analysisPreview: function (param, callback) {
        API.callInterface("/analysis/analysis_preview.do", param, true, callback);
    },
    deleteAnalysis: function (param, callback) {
        API.callInterface("/analysis/sentence_delete.do", param, true, callback);
    },
    cannottagAnalysis: function (param, callback) {
        API.callInterface("/analysis/sentence_cannottag.do", param, true, callback);
    },
    cantagAnalysis: function (param, callback) {
        API.callInterface("/analysis/sentence_cantag.do", param, true, callback);
    },
    recoverAnalysis: function (param, callback) {
        API.callInterface("/analysis/sentence_recover.do", param, true, callback);
    },

    analysisSentenceSubdivision: function (param, callback) {
        API.callInterface("/analysis/sentence_subdivision_edit.do", param, true, callback);
    },
    analysisChangeValid: function (param, callback) {
        API.callInterface("/analysis/change_valid_flag.do", param, true, callback);
    },
    subdivisionPreview: function (param, callback) {
        API.callInterface("/analysis/subdivision_preview.do", param, true, callback);
    },
    // 标注-end


    // 同义词-begin    
    synonymyDelete: function (param, callback) {
        API.callInterface("/synonymy/synonymy_delete.do", param, true, callback);
    },

    synonymyMerge: function (param, callback) {
        API.callInterface("/synonymy/synonymy_merge.do", param, true, callback);
    },

    synonymyEdit: function (param, callback) {
        API.callInterface("/synonymy/synonymy_edit.do", param, true, callback);
    },

    synonymyEditBatch: function (param, callback) {
        API.callInterface("/synonymy/synonymy_edit_batch.do", param, true, callback);
    },

    synonymyChangeStd: function (param, callback) {
        API.callInterface("/synonymy/change_std.do", param, true, callback);
    },
    synonymyChangeEnglishStd: function (param, callback) {
        API.callInterface("/synonymy/change_english_std.do", param, true, callback);
    },
    synonymyElementTInit: function (callback) {
        API.callInterface("/synonymy/element_t_init.do", {}, true, callback);
    },
    synonymyElementRInit: function (callback) {
        API.callInterface("/synonymy/init_r_synonymy.do", {}, true, callback);
    },
    // 同义词-end

    // 科室-begin
    sectionDeleteWarn: function (param, callback) {
        API.callInterface("/section/delete_warn.do", param, false, callback);
    },
    sectionSetSex: function (param, callback) {
        API.callInterface("/section/set_sex.do", param, false, callback);
    },

    sectionSetAge: function (param, callback) {
        API.callInterface("/section/set_age.do", param, false, callback);
    },

    sectionSubmitSexAge: function (param, callback) {
        API.callInterface("/section/submit_sex_age.do", param, true, callback);
    },

    sectionUpdateImage: function (param, callback) {
        API.callInterface("/section/update_image_data.do", param, true, callback);
    },
    sectionDeleteImage: function (param, callback) {
        API.callInterface("/section/delete_section_image.do", param, true, callback);
    },
    // 科室-end
    tabHelpList: function (callback) {
        API.callInterface("/tabHelp.do", {}, true, callback);
    },
    tabHelpChange: function (param, callback) {
        API.callInterface("/tabHelpChange.do", param, true, callback);
    },
    changeDisable: function (param, callback) {
        API.callInterface("/icd/disease_hospital_change_disable.do", param, true, callback);
    },
    submitPageDiseaseCheckFlag: function (param, callback) {
        API.callInterface("/icd/change_hospital_checkFlag.do", param, true, callback);
    },
    updateTestingClassDisable: function (param, callback) {
        API.callInterface("/inspection/update_testing_class_disabe.do", param, true, callback);
    },
    moveTestingClass: function (param, callback) {
        API.callInterface("/inspection/move_testing_class.do", param, true, callback);
    },
    updateMedicineGroup: function (param, callback) {
        API.callInterface("/medicine/update_medicine_group.do", param, true, callback);
    },
    deleteMedicineGroup: function (param, callback) {
        API.callInterface("/medicine/delete_medicine_group.do", param, true, callback);
    },
    updateDiMedicineGroup: function (param, callback) {
        API.callInterface("/medicine/update_di_medicine_group.do", param, true, callback);
    },
    deleteDiMedicineGroup: function (param, callback) {
        API.callInterface("/medicine/delete_di_medicine_group.do", param, true, callback);
    },
    deleteDisease: function (param, callback) {
        API.callInterface("/icd/disease_gaoge_delete.do", param, true, callback);
    },
    addGaogeDisease: function (param, callback) {
        API.callInterface("/icd/disease_gaoge_add.do", param, true, callback);
    },
    updateDiseaseWeather: function (param, callback) {
        API.callInterface("/icd/disease_weather/update_data.do", param, true, callback);
    },
    deleteDiseaseWeather: function (param, callback) {
        API.callInterface("/icd/disease_weather/delete_data.do", param, true, callback);
    },
    addDiseaseWeather: function (param, callback) {
        API.callInterface("/icd/disease_weather/add_data.do", param, true, callback);
    },
    updateAnalysisDictionary: function (param, callback) {
        API.callInterface("/analysis/dictionary/update_dictionary.do", param, true, callback);
    },
    deleteAnalysisDictionary: function (param, callback) {
        API.callInterface("/analysis/dictionary/delete_dictionary.do", param, true, callback);
    },
    addAnalysisDictionary: function (param, callback) {
        API.callInterface("/analysis/dictionary/add_dictionary.do", param, true, callback);
    },
    deleteDrugImage: function (param, callback) {
        API.callInterface("/medicine/delete_drug_image.do", param, true, callback);
    },
    deleteDrug: function (param, callback) {
        API.callInterface("/medicine/delete_drug.do", param, true, callback);
    },
    updateDiseaseArticle: function (param, callback) {
        API.callInterface("/icd/update_disease_article.do", param, true, callback);
    },
    deleteArticle: function (param, callback) {
        API.callInterface("/icd/delete_disease_article.do", param, true, callback);
    },
    forceEditSentence: function (param, callback) {
        API.callInterface("/analysis/sentence_force_edit.do", param, true, callback);
    },
    editSymptomReveal: function (param, callback) {
        API.callInterface("/symptom/reveal_edit.do", param, true, callback);
    },
    updateSymptomRevealStatus: function (param, callback) {
        API.callInterface("/symptom/reveal_update_status.do", param, true, callback);
    },
    initSectionImageRank: function (param, callback) {
        API.callInterface("/section/init_section_image_rank.do", param, true, callback);
    },
    moveSectionImageRank: function (param, callback) {
        API.callInterface("/section/move_section_image_rank.do", param, true, callback);
    },
    submitSectionCodeEdit: function (param, callback) {
        API.callInterface("/section/submit_section_code_edit.do", param, true, callback);
    },
    submitSectionHospitalEdit: function (param, callback) {
        API.callInterface("/section/submit_hospital_edit.do", param, true, callback);
    },
    submitSectionBlackEdit: function (param, callback) {
        API.callInterface("/section/submit_section_black_edit.do", param, true, callback);
    },
    submitSectionSynonymyEdit: function (param, callback) {
        API.callInterface("/section/submit_section_synonymy_edit.do", param, true, callback);
    },
    icdDiseaseSymptomChangeFlag: function (param, callback) {
        API.callInterface("/icd/disease_symptom_change_flag.do", param, true, callback);
    },
    icdDiseaseSymptomSubmitPage: function (param, callback) {
        API.callInterface("/icd/disease_symptom_submit_page.do", param, true, callback);
    },
    icdDiseaseSymptomDescriptionSplit: function (param, callback) {
        API.callInterface("/icd/disease_symptom_description_split.do", param, true, callback);
    },
    icdDiseaseSymptomDescriptionSubmitPage: function (param, callback) {
        API.callInterface("/icd/disease_symptom_description_submit.do", param, true, callback);
    },
    icdDiseaseSymptomDescriptionChangeArray: function (param, callback) {
        API.callInterface("/icd/disease_symptom_description_change_array.do", param, true, callback);
    },
    icdDiseaseSectionBlackWhiteChangeFlag: function (param, callback) {
        API.callInterface("/icd/disease_section_black_white_change_flag.do", param, true, callback);
    },
    icdDiseaseSectionBlackWhiteSubmitPage: function (param, callback) {
        API.callInterface("/icd/disease_section_black_white_submit_page.do", param, true, callback);
    },
    icdDiseaseSectionRepositorySubmitPage: function (param, callback) {
        API.callInterface("/icd/disease_section_repository_submit_page.do", param, true, callback);
    },
    icdDiseaseSectionRepositoryChangeOptimumSection: function (param, callback) {
        API.callInterface("/icd/disease_section_repository_change_optimum_section.do", param, true, callback);
    },
    icdDiseaseHospitalSumitEdit: function (param, callback) {
        API.callInterface("/icd/disease_hospital_submit_edit.do", param, true, callback);
    },
    sectionDnnDisableChangeDisable: function (param, callback) {
        API.callInterface("/section/section_dnn_disable_change_disable.do", param, true, callback);
    },
    sectionDnnDisableChangeAscriptionSection: function (param, callback) {
        API.callInterface("/section/section_dnn_disable_change_ascription_section.do", param, true, callback);
    },
    sectionDnnDisableSubmitPage: function (param, callback) {
        API.callInterface("/section/section_dnn_disable_submit_page.do", param, true, callback);
    },
    changeRevealWithSynonym: function (param, callback) {
        API.callInterface("/symptom/reveal_change_with_synonym.do", param, true, callback);
    },
    remindConfirm: function (param, callback) {
        API.callInterface("/remind_confirm.do", {}, true, callback);
    },
    checkExternalDisease: function (param, callback) {
        API.callInterface("/icd/check_external_disease.do", param, true, callback);
    },
    changeExternalDisease: function (param, callback) {
        API.callInterface("/icd/change_external_disease.do", param, true, callback);
    },
    initExternalDisease: function (param, callback) {
        API.callInterface("/icd/disease_external_init.do", param, true, callback);
    },
    initExternal: function (param, callback) {
        API.callInterface("/icd/disease_external_init_disease.do", param, true, callback);
    },
    changeExternalDisable: function (param, callback) {
        API.callInterface("/icd/disease_external_change_disable.do", param, true, callback);
    },
    changeExternalCategory: function (param, callback) {
        API.callInterface("/icd/disease_external_change_category.do", param, true, callback);
    },
    submitExternal: function (param, callback) {
        API.callInterface("/icd/disease_external_submit.do", param, true, callback);
    },
    managementClassUpdate: function (param, callback) {
        API.callInterface("/management/page_class_update.do", param, true, callback);
    },
    managementClassDelete: function (param, callback) {
        API.callInterface("/management/page_class_delete.do", param, true, callback);
    },
    managementClassDeleteAll: function (param, callback) {
        API.callInterface("/management/page_class_delete_all.do", param, true, callback);
    },
    managementRoleAdd: function (param, callback) {
        API.callInterface("/management/page_role_add.do", param, true, callback);
    },
    managementClassAdd: function (param, callback) {
        API.callInterface("/management/page_class_add.do", param, true, callback);
    },
    icdDiseaseSymptomBlakcChangeFlag: function (param, callback) {
        API.callInterface("/icd/disease_symptom_black_change_black_flag.do", param, true, callback);
    },
    icdDiseaseSymptomBlakcSubmit: function (param, callback) {
        API.callInterface("/icd/disease_symptom_black_submit.do", param, true, callback);
    },
    icdDiseaseSymptomBlakcInit: function (param, callback) {
        API.callInterface("/icd/disease_symptom_black_init_std.do", param, true, callback);
    },
    managementUpdateLabel: function (param, callback) {
        API.callInterface("/management/analysis_label_update.do", param, true, callback);
    },
    managementDeleteLabel: function (param, callback) {
        API.callInterface("/management/analysis_label_delete.do", param, true, callback);
    },
    managementAddLabel: function (param, callback) {
        API.callInterface("/management/analysis_label_add.do", param, true, callback);
    },
    managementUpdateCompany: function (param, callback) {
        API.callInterface("/management/update_company.do", param, true, callback);
    },
    managementAddCompany: function (param, callback) {
        API.callInterface("/management/add_company.do", param, true, callback);
    },
    managementDeleteCompany: function (param, callback) {
        API.callInterface("/management/delete_company.do", param, true, callback);
    },
    managementSetCompany: function (param, callback) {
        API.callInterface("/management/user_company_id.do", param, true, callback);
    },
    managementUpdateStaticData: function (param, callback) {
        API.callInterface("/management/update_static_data.do", param, true, callback);
    },
    answerCheckFlag: function (param, callback) {
        API.callInterface("/answer/answer_check_flag.do", param, true, callback);
    },
    deleteOrgan: function (param, callback) {
        API.callInterface("/body/deleteOrgan.do", param, true, callback);
    },
    deleteOrganSymptom: function (param, callback) {
        API.callInterface("/body/deleteOrganSymptom.do", param, true, callback);
    },
    editOrganSymptom: function (param, callback) {
        API.callInterface("/body/editOrganSymptom.do", param, true, callback);
    },
    markSentenceEdit: function (param, callback) {
        API.callInterface("/mark_sentence/sentence_edit.do", param, true, callback);
    },


    // 主诉-beign
    deleteZs: function (param, callback) {
        API.callInterface("/zs/sentence_delete.do", param, true, callback);
    },
    recoverZs: function (param, callback) {
        API.callInterface("/zs/sentence_recover.do", param, true, callback);
    },
    ruleEditZs: function (param, callback) {
        API.callInterface("/zs/rule_edit.do", param, false, callback);
    },
    ruleEditXbs: function (param, callback) {
        API.callInterface("/xbs/rule_edit.do", param, false, callback);
    },
    sentenceEditZs: function (param, callback) {
        API.callInterface("/zs/sentence_edit.do", param, true, callback);
    },
    // 主诉-end
    // 现病史-beign
    deleteXbs: function (param, callback) {
        API.callInterface("/xbs/sentence_delete.do", param, true, callback);
    },
    recoverXbs: function (param, callback) {
        API.callInterface("/xbs/sentence_recover.do", param, true, callback);
    },
    canTagXbs: function (param, callback) {
        API.callInterface("/xbs/sentence_can_tag.do", param, true, callback);
    },
    canNotTagXbs: function (param, callback) {
        API.callInterface("/xbs/sentence_not_tag.do", param, true, callback);
    },
    // 现病史-end


}

// velocity与jquery冲突的解决方法
var dw = {
    ajax: function (s) {
        jQuery.ajax(s);
    }
}

function signparam(param, timestamp, nonce) {
    var arr = [];
    for (key in param) {
        if (param[key] == undefined || param[key] == null || param[key] == '') {
            param[key] = '';
        }
        arr.push(key + '=' + param[key]);
    }
    arr.sort();

    var aparam = '';
    for (str in arr) {
        aparam += arr[str];
        aparam += '&';
    }
    aparam += timestamp;
    aparam += nonce;

    return hex_sha1(utf16to8(aparam));
}

function importFile(file, url, status) {
    var file = $("#file").val();
    if (file) {
        var FileExt = file.replace(/.+\./, "");   //正则表达式获取后缀

        // 后缀只能是xlsx，其他不处理
        if (FileExt != 'xlsx') {
            alert("请上传xlsx后缀的Excel文件");
            return false;
        }
        $.ajaxFileUpload({
            url: url,
            secureuri: false,
            fileElementId: 'file',
            dataType: 'json',
            data: {
                'status': status
            },
            success: function (data) {
                $("#file").after($("#file").clone().val(""));
                $("#file").remove();
                if (data.code == '0') {
                    alert("导入成功！");
                    window.location.reload();
                } else {
                    alert(data.desc);
                    window.location.reload();
                }
            },
            error: function (data, e) {
                alert("导入失败！");
                window.location.reload();
            }
        });
    }

}